<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8" %>


<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" lang="en">

<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<link rel="stylesheet" type="text/css" href="css/login.css" />
<link rel="stylesheet" href="css/reset.css">
        <link rel="stylesheet" href="css/supersized.css">
        <link rel="stylesheet" href="css/style.css">
<title>登录界面</title>
</head>

<body>
   <!-- 获取cookie的值 -->
	<%
	request.setCharacterEncoding("UTF-8");
	String name_value = "";
	if(request.getCookies() !=null){
		Cookie[] cook = request.getCookies();
		for (Cookie cookie : cook) {
			if (cookie.getName().equals("user")) {
				name_value = cookie.getValue();
				break;
			}
		}
	}
%>
	 <div class="page-container" >
			<form action="dologin.jsp" method="post" class="form"
				onclick="return my_click()">
				<table class="bodytable"  border="1">
					<tr height="80px">
						<td colspan="2"><span
							style="font-size: 38px; font-family: 微软雅黑;">多媒体教室管理系统</span></td>
					</tr>
					<tr style="text-align: center; height: 50px">
						<td colspan="2"><span
							style="font-size: 38px; font-family: 微软雅黑;">用户登录</span></td>
					</tr>
					<tr height="30px">
						<td colspan="2" align="center">
						<!-- 获取网页提示信息 -->
							<%
								if (request.getAttribute("message") != null) {
									out.println("<span style=\"color:red;font-size:20px;\">" + request.getAttribute("message") + "</span>");
								}
							%>
						</td>
					</tr>
					<tr height="50px">
						<td align="right" class="inputtext">用户名：</td>
						<td><input type="text" name="username" class="username" value="<%=name_value%>"
							></td>
					</tr>

					<tr height="50px">
						<td align="right" class="inputtext">密&nbsp;码：</td>
						<td>
						<input type="password" name="userpass" class="password">
						</td>
					</tr>
					<tr>
						<td align="right" class="inputtext">身&nbsp;份：</td>
						<td>
						<input type="radio" name="ranks" value="1"checked="checked" style="width: 20px; height: 15px;">
						<span class="span">学生</span> 
						<input type="radio" name="ranks" value="2" style="width: 20px; height: 15px;">
						<span class="span">管理员</span>
						</td>
					</tr>
					<tr style="text-align: right; height: 50px;">
						<td></td>
						<td><input type="checkbox" name="userreg" style="width: 20px; height: 15px;">
							<span class="span1">记住用户</span>
							</td>
					</tr>
					<tr height="50px" style="text-align: center;">
						<td colspan="2">
					<button type="submit">登&nbsp;录</button>	
					</tr>
				</table>
				<div class="error"><span>+</span></div>
            </form>
		</div>
		<!-- Javascript -->
        <script src="js/jquery-1.8.2.min.js"></script>
        <script src="js/supersized.3.2.7.min.js"></script>
        <script src="js/supersized-init.js"></script>
        <script src="js/scripts.js"></script>
</body>

</html>